Optimal. Leaf size=75 \[ \frac {2 \sqrt {a^2-b^2} \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{a b d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.240, Rules used = {2889, 3058, 2660, 618, 204, 3770} \[ \frac {2 \sqrt {a^2-b^2} \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )}{a b d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {x}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 204
Rule 618
Rule 2660
Rule 2889
Rule 3058
Rule 3770
Rubi steps
\begin {align*} \int \frac {\cos (c+d x) \cot (c+d x)}{a+b \sin (c+d x)} \, dx &=\int \frac {\csc (c+d x) \left (1-\sin ^2(c+d x)\right )}{a+b \sin (c+d x)} \, dx\\ &=-\frac {x}{b}+\frac {\int \csc (c+d x) \, dx}{a}-\left (-\frac {a}{b}+\frac {b}{a}\right ) \int \frac {1}{a+b \sin (c+d x)} \, dx\\ &=-\frac {x}{b}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}+\frac {\left (2 \left (\frac {a}{b}-\frac {b}{a}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{a+2 b x+a x^2} \, dx,x,\tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}\\ &=-\frac {x}{b}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}-\frac {\left (4 \left (\frac {a}{b}-\frac {b}{a}\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-4 \left (a^2-b^2\right )-x^2} \, dx,x,2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{d}\\ &=-\frac {x}{b}+\frac {2 \sqrt {a^2-b^2} \tan ^{-1}\left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{a b d}-\frac {\tanh ^{-1}(\cos (c+d x))}{a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 90, normalized size = 1.20 \[ -\frac {-2 \sqrt {a^2-b^2} \tan ^{-1}\left (\frac {a \tan \left (\frac {1}{2} (c+d x)\right )+b}{\sqrt {a^2-b^2}}\right )+a c+a d x-b \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+b \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )}{a b d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.54, size = 262, normalized size = 3.49 \[ \left [-\frac {2 \, a d x + b \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - b \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - \sqrt {-a^{2} + b^{2}} \log \left (-\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} - 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right )}{2 \, a b d}, -\frac {2 \, a d x + b \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) - b \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) + 2 \, \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right )}{2 \, a b d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 3.34, size = 94, normalized size = 1.25 \[ -\frac {\frac {d x + c}{b} - \frac {\log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a} - \frac {2 \, {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\relax (a) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} \sqrt {a^{2} - b^{2}}}{a b}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.17, size = 137, normalized size = 1.83 \[ \frac {2 a \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{d b \sqrt {a^{2}-b^{2}}}-\frac {2 b \arctan \left (\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{d a \sqrt {a^{2}-b^{2}}}-\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d b}+\frac {\ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 5.39, size = 896, normalized size = 11.95 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\cos {\left (c + d x \right )} \cot {\left (c + d x \right )}}{a + b \sin {\left (c + d x \right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________